package src.origintrail;
import java.awt.*;
import javax.swing.*;
public class MapPanel extends JPanel
{
	private ImageIcon icon;
	private JLabel imageLabel;
	private ImageIcon icon1;
	private JLabel imageLabel1;
	private int count;
	
	
	public MapPanel()
	{
		icon = new ImageIcon("src/origintrail/images/map0.png");
		imageLabel = new JLabel(icon);
		add(imageLabel);
		setVisible(true);
		count = 0;
	}
	
	public void updatePosition()
	{
		count++;
		String file = "src/origintrail/images/map"+count+ ".png";
		ImageIcon icon = new ImageIcon(file);
		imageLabel.setIcon(icon);
		add(imageLabel);
		setVisible(true);
		
	}
        public int getCount(){
            return this.count;
        }

        public void setCount(int newC) {
            this.count = newC;
		String file = "src/origintrail/images/map"+count+ ".png";
		ImageIcon icon = new ImageIcon(file);
		imageLabel.setIcon(icon);
		add(imageLabel);
		setVisible(true);
        }
}
